// pages/to-report/index.js
const app = getApp();
const { AskPage } = app._require("common/index");
const formMixin = app._require("mixins/form.mixin.js").default;
AskPage({
    /**
     * 页面的初始数据
     */
    mixins: [formMixin],
    data: {
        result: ["灾情上报", "矛盾纠纷", "黄赌毒", "日常违法", "其他"],
        left_checked: true,
    },
  /**
   * 页面的初始数据
   */
  data: {
    result: ["灾情上报","矛盾纠纷","黄赌毒","日常违法","其他"],
    left_checked:true,
    chose_report_style:0
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    if (typeof this.getTabBar === "function" && this.getTabBar()) {
      this.getTabBar().setData({
          active: "/" + this.route,
      });
  }
  },
  clickHistory(){
    console.log("查看历史");
    wx.navigateTo({
      url:"./history/index"
  }) 
  },
  checkLeftBoxAction(){
    // console.log('ssss');
    // this.left_checked = true;
    this.setData({
      left_checked:true,
      });
  },
  checkRightBoxAction(){
    // console.log('ssss');
    this.setData({
      left_checked:false,
      });
    
  },
  reportStyleAction(e){
    var index = e.currentTarget.dataset.index;
    // console.log(index);
    this.setData({
      chose_report_style:index
    });
  },
  switchChange(e){
    console.log(e);
  }


})
